package com.xm.xmapp.response.bean;

import java.util.ArrayList;

import android.graphics.Bitmap;

import com.amap.api.maps.model.LatLng;
import com.xm.xmapp.R;
import com.xm.xmapp.app.MyAppcation;
import com.xm.xmapp.map.ClusterItem;
import com.xm.xmapp.tools.ImageTool;

public class ResponseAllNetwork {

	public int is_update, times;
	public ArrayList<PileNetWork> points;

	public static class PileNetWork implements ClusterItem {
		/**
		 * 
		 */
		private static final long serialVersionUID = -5072427623198814932L;
		public int is_fast, is_self, pileNetworkId;
		public String charging_network_name;
		public Double latitude, longitude;

		@Override
		public LatLng getLatLng() {
			LatLng lat = null;
			try {
				lat = new LatLng(latitude, longitude);
				return lat;
			} catch (Exception e) {
				e.printStackTrace();
			}
			return new LatLng(0, 0);
		}

		@Override
		public String getName() {
			return charging_network_name;
		}

		@Override
		public int getNetworkId() {
			return pileNetworkId;
		}

		@Override
		public int getCars(int flag) {
			return 0;
		}

		/**
		 * 需求更改快充慢充都用同一个图标
		 */
		@Override
		public Bitmap getImageBitmap(int flag) {
			if (is_fast == 1)
				return ImageTool.getBitmap("", MyAppcation.getMyAppcation(), R.mipmap.charging_icon_slow_press);
			else
				return ImageTool.getBitmap("", MyAppcation.getMyAppcation(), R.mipmap.charging_icon_slow_press);
		}

		@Override
		public int getIs_send_car_service() {

			return 0;
		}

		@Override
		public int getCar_total() {
			return 0;
		}

		@Override
		public int getType() {
			return ClusterItem.TYPE_NETWORK;
		}

		@Override
		public boolean hasImgs() {

			return false;
		}
	}

}
